Route plotting method and apparatus, computer device, storage medium and program product

ABSTRACT

A route plotting method includes: displaying an electronic map; determining multiple position points in the electronic map, where longitude coordinates of the multiple position points fall within a first longitude coordinate range; converting a project longitude coordinate to a target longitude coordinate range in response to that the multiple position points meet a conversion condition; where the conversion condition includes: an absolute value of a difference between longitude coordinates of adjacent position points is greater than a first value, the first value being a maximum value within the first longitude coordinate range; and the project longitude coordinate is a longitude coordinate in the longitude coordinates of the multiple position points that does not fall within the target longitude coordinate range; and plotting, in order of converted longitude coordinates, a route formed by connecting the multiple position points in the electronic map.

RELATED APPLICATIONS

This application is a continuation application of PCT Patent ApplicationNo. PCT/CN2022/132978 filed on Nov. 18, 2002, which claims priority toChinese Patent Application No. 202210070269.1, entitled “ROUTE PLOTTINGMETHOD AND APPARATUS, COMPUTING DEVICE AND STORAGE MEDIUM” filed on Jan.21, 2022, all of which are incorporated by reference in entirety.

FIELD OF THE TECHNOLOGY

The present disclosure relates to the field of maps, and in particularrelates to a route plotting method and apparatus, a computing device, astorage medium and a program product.

BACKGROUND

If the earth is regarded as a sphere, a great circle arc line betweenany two points on the ground is the shortest route between the twopoints on the ground. With the development of computer technologies andthe widespread implementation of electronic maps, it may be desirable toplot a route between two points in the electronic map. A suitable routeplotting method is desirable.

SUMMARY

Embodiments of the present disclosure provide a route plotting methodand apparatus, a computing device, a storage medium and a programproduct. The technical solutions are as follows:

In one aspect, a route plotting method is provided. The method isexecuted by a computing device, and the method includes:

-   -   determining multiple position points in an electronic map, the        electronic map having a first longitude coordinate range and a        target longitude coordinate range, and longitude coordinates of        the multiple position points falling within the first longitude        coordinate range;    -   converting a project longitude coordinate to the target        longitude coordinate range in response to that the multiple        position points meet a conversion condition, the conversion        condition including: an absolute value of a difference between        longitude coordinates of adjacent position points is greater        than a first value, the first value being a maximum value within        the first longitude coordinate range; and the project longitude        coordinate is a longitude coordinate in the longitude        coordinates of the multiple position points that does not fall        within the target longitude coordinate range; and    -   plotting, in order of converted longitude coordinates, a route        formed by connecting the multiple position points in the        electronic map.

In certain embodiment(s), the project longitude coordinate is aspecified longitude coordinate.

In certain embodiment(s), the operation of determining coordinates of atleast one first way point between a starting point and an end pointaccording to coordinates of the starting point and coordinates of theend point is executed by a central processing unit, and the operation ofdetermining, from the starting point, the end point and the at least onefirst way point, coordinates of at least one second way point betweenevery two adjacent position points in parallel according to coordinatesof every two adjacent position points is executed by a graphicsprocessing unit.

In certain embodiment(s), the method further includes:

-   -   storing, by the central processing unit, the coordinates of the        starting point, the coordinates of the end point and the        coordinates of the at least one first way point in an internal        memory buffer space; and    -   acquiring, by the graphics processing unit, the coordinates of        the starting point, the coordinates of the end point and the        coordinates of the at least one first way point in the internal        memory buffer space.

In certain embodiment(s), determining the target longitude coordinatedifference includes:

-   -   determining a first ratio between the target longitude        coordinate difference and the maximum longitude coordinate        difference, and a second ratio between the target latitude        coordinate difference and the maximum latitude coordinate        difference; and    -   determining, based on the first ratio and the second ratio, the        target quantity, where the target quantity is positively        correlated with the maximum value of the first ratio and the        second ratio.

In another aspect, a route plotting apparatus is provided. The apparatusincludes: a memory storing computer program instructions; and aprocessor coupled to the memory and configured to execute the computerprogram instructions and perform: determining multiple position pointsin an electronic map, the electronic map including a first longitudecoordinate range and a target longitude coordinate range, and longitudecoordinates of the multiple position points falling within the firstlongitude coordinate range; converting a project longitude coordinate tothe target longitude coordinate range in response to that the multipleposition points meet a conversion condition, the conversion conditionincluding: an absolute value of a difference between longitudecoordinates of adjacent position points is greater than a first value,the first value being a maximum value within the first longitudecoordinate range; and the project longitude coordinate is a longitudecoordinate in the longitude coordinates of the multiple position pointsthat does not fall within the target longitude coordinate range; andplotting, in order of converted longitude coordinates, a route formed byconnecting the multiple position points in the electronic map.

In another aspect, a computing device is provided. The computing deviceincludes a processor and a memory, where the memory stores at least onecomputer program, and the at least one computer program is loaded andexecuted by the processor to implement operations performed by the routeplotting method as described herein.

In another aspect, a non-transitory computer-readable storage medium isprovided. The computer-readable storage medium stores at least onecomputer program, and the at least one computer program is loaded andexecuted by a processor to implement operations performed by the routeplotting method as described herein.

In response to that the absolute value of the difference between thelongitude coordinates of adjacent position points is greater than themaximum value of the first longitude coordinate range, it indicates thatthese two adjacent position points are located at two sides of alongitude line where the minimum longitude coordinate and the maximumlongitude coordinate are located, respectively, and if plotting isperformed directly according to the longitude coordinates, there will bea problem that a plotted route has an error. In order to plot a correctroute, in the solutions provided by various embodiments of the presentdisclosure, the project longitude coordinate in the multiple positionpoints is converted to the target longitude coordinate range, so thatthe longitude coordinates of the multiple position points all fallwithin the target longitude coordinate range, so as to change longitudecoordinates corresponding to a longitude line that a route between thesetwo position points crosses. At this time, plotting is performedaccording to the converted longitude coordinates, and thus, the shortestroute formed by connecting the multiple position points may be plotted,and the accuracy of route plotting is improved.

Other aspects of the present disclosure may be understood by thoseskilled in the art in light of the description, the claims, and thedrawings of the present disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

To facilitate a better understanding of technical solutions of certainembodiments of the present disclosure, accompanying drawings aredescribed below. The accompanying drawings are illustrative of certainembodiments of the present disclosure. When the following descriptionsare made with reference to the accompanying drawings, unless otherwiseindicated, same numbers in different accompanying drawings may representsame or similar elements. In addition, the accompanying drawings are notnecessarily drawn to scale.

FIG. 1 is a schematic diagram of a great circle arc line according tocertain embodiment(s) of the present disclosure.

FIG. 2 is a schematic diagram of an implementation environment accordingto certain embodiment(s) of the present disclosure.

FIG. 3 is a schematic flowchart of a route plotting method according tocertain embodiment(s) of the present disclosure.

FIG. 4 is a schematic flowchart of another route plotting methodaccording to certain embodiment(s) of the present disclosure.

FIG. 5 is a schematic diagram of a route according to certainembodiment(s) of the present disclosure.

FIG. 6 is a schematic diagram of an electronic map according to certainembodiment(s) of the present disclosure.

FIG. 7 is a schematic diagram of another electronic map according tocertain embodiment(s) of the present disclosure.

FIG. 8 is a schematic flowchart of another route plotting methodaccording to certain embodiment(s) of the present disclosure.

FIG. 9 is a schematic flowchart of a coordinate conversion methodaccording to certain embodiment(s) of the present disclosure.

FIG. 10 is a schematic flowchart of yet another route plotting methodaccording to certain embodiment(s) of the present disclosure.

FIG. 11 is a schematic flowchart of another coordinate conversion methodaccording to certain embodiment(s) of the present disclosure.

FIG. 12 is a schematic flowchart of still another route plotting methodaccording to certain embodiment(s) of the present disclosure.

FIG. 13 is a schematic flowchart of a position point determinationmethod according to certain embodiment(s) of the present disclosure.

FIG. 14 is a schematic flowchart of another position point determinationmethod according to certain embodiment(s) of the present disclosure.

FIG. 15 is a schematic flowchart of still another route plotting methodaccording to certain embodiment(s) of the present disclosure.

FIG. 16 is a schematic diagram of an electronic map interface accordingto certain embodiment(s) of the present disclosure.

FIG. 17 is a schematic diagram of another electronic map interfaceaccording to certain embodiment(s) of the present disclosure.

FIG. 18 is a schematic structural diagram of a route plotting apparatusaccording to certain embodiment(s) of the present disclosure.

FIG. 19 is a schematic structural diagram of another route plottingapparatus according to certain embodiment(s) of the present disclosure.

FIG. 20 is a schematic structural diagram of a terminal according tocertain embodiment(s) of the present disclosure.

DETAILED DESCRIPTION

To make objectives, technical solutions, and/or advantages of thepresent disclosure more comprehensible, certain embodiments of thepresent disclosure are further elaborated in detail with reference tothe accompanying drawings. The embodiments as described are not to beconstrued as a limitation to the present disclosure. All otherembodiments obtained by a person of ordinary skill in the art withoutcreative efforts shall fall within the protection scope of embodimentsof the present disclosure.

When and as applicable, the term “an embodiment,” “one embodiment,”“some embodiment(s), “some embodiments,” “certain embodiment(s),” or“certain embodiments” may refer to one or more subsets of embodiments.When and as applicable, the term “an embodiment,” “one embodiment,”“some embodiment(s), “some embodiments,” “certain embodiment(s),” or“certain embodiments” may refer to the same subset or different subsetsof embodiments, and may be combined with each other without conflict.

In certain embodiments, the term “based on” is employed hereininterchangeably with the term “according to.”

For ease of understanding of embodiments of the present disclosure,concepts involved are firstly explained as follows:

1. Great circle arc line: the great circle arc line, also referred to asa great circle course line or a geodetic curve, is the shortest routebetween any two points on the ground and is also a geographical routewith the shortest geographical distance adopted during navigation. Thegreat circle arc line is composed of an intersection line of a planecomposed of two points and the core of the earth that is tangent to thecurved surface of the earth. If the earth is regarded as a circularsphere, the shortest distance between two points on the ground is agreat circle arc line less than 180° connecting the two points.

FIG. 1 is a schematic diagram of a great circle arc line provided by anembodiment of the present disclosure. As shown in FIG. 1 , a curve AB isthe shortest circle arc between a point A and a point B on a sphericalsurface, i.e., a great circle arc line between the point A and the pointB. The great circle arc line is formed by an intersection line of aplane composed of a point O, the point A and the point B that is tangentto the curved surface of the earth. A curve AC is the shortest circulararc between the point A and a point C on the spherical surface, i.e., agreat circle arc line between the point A and the point C. The greatcircle arc line is formed by an intersection line of a plane composed ofthe point O, the point A and the point C that is tangent to the curvedsurface of the earth.

2. JavaScript API GL (a rendering engine): a web graphics library(WebGL)-based web side rendering engine of a map, may provide3-dimension (3D) versions of web developers to directly call base mapdata of the map, and may provide advanced visualization graphicscapabilities such as points, lines, planes and personalized graphicslayers.

3. WebGL: a technology used for plotting and rendering 3D graphics on aweb, and allowing users to interact therewith, an underlying OpenGLShading Language (GLSL) of which may be directly used for performingoperations and arithmetic operations on a graphics processing unit(GPU).

4. Vertex shader: a program used for describing vertex characteristics(such as positions, and colors). A vertex refers to a point in a 2D or3D space, such as an end point or an intersection point of a 2D or 3Dgraphic.

5. Fragment shader: a program used for processing data such as colors orlight fragment by fragment. The GPU may process multiple fragments inparallel, and one fragment may also be understood as one pixel unit.

FIG. 2 is a schematic diagram of an implementation environment providedby an embodiment of the present disclosure. Referring to FIG. 2 , theimplementation environment includes: a terminal 201 and a server 202.The terminal 201 and the server 202 may be directly or indirectlyconnected via wired or wireless communication. The server 202 isconfigured to provide an electronic map to the terminal 201, and theterminal 201 is configured to plot a route formed by connecting multipleposition points in the electronic map.

In one embodiment, a target application serviced by the server 202 isinstalled on the terminal 201. The terminal 201 may implement, by thetarget application, functions such as displaying the electronic map andplotting navigation routes. In certain embodiment(s), the targetapplication is a target application in an operating system of theterminal 201, or a target application provided by a third party. Forexample, the target application is an electronic map application, andthe like. In certain embodiment(s), the server 202 is a backgroundserver of the target application or a cloud server that providesservices such as cloud computing and cloud storage.

In one embodiment, the terminal 201 may be a smartphone, a tabletcomputer, a laptop, a desktop computer, a smart speaker, a smart voiceinteraction device, a smartwatch, a car-mounted terminal, and the like,but is not limited thereto. The server 202 may be an independentphysical server, or a server cluster or distributed system composed ofmultiple physical servers, and may also be a cloud server that providescloud services, cloud databases, cloud computing, cloud functions, cloudstorage, network services, cloud communications, middleware services,domain name services, security services, content delivery networks(CDN), and cloud computing services such as big data and artificialintelligence platforms.

FIG. 3 is a flowchart of a route plotting method provided by anembodiment of the present disclosure. An executive subject of thisembodiment of the present disclosure is a computing device. Referring toFIG. 3 , the method includes:

301: Determine, by the computing device, multiple position points in anelectronic map.

The electronic map is a map stored digitally by using a computertechnology. The electronic map has a first longitude coordinate rangeand a target longitude coordinate range, and the first longitudecoordinate range and the target longitude coordinate range aredetermined in different longitude coordinate systems. Therefore,although both the first longitude coordinate range and the targetlongitude coordinate range are used for representing geographicalregions in the electronic map, the first longitude coordinate range andthe target longitude coordinate range are not the same.

The electronic map includes various position points in any one or moregeographical regions therein. Since the electronic map has the firstlongitude coordinate range and the target longitude coordinate range,longitude coordinates in the first longitude coordinate range may beused for describing the position points in the electronic map, orlongitude coordinates in the target longitude coordinate range may beused for describing the position points in the electronic map.

In this embodiment of the present disclosure, the computing devicedetermines the multiple position points in the electronic map, andlongitude coordinates of these multiple position points fall within thefirst longitude coordinate range.

302: Convert, by the computing device, a project longitude coordinate tothe target longitude coordinate range in response to that the multipleposition points meet a conversion condition; the project longitudecoordinate being a longitude coordinate in the longitude coordinates ofthe multiple position points that does not fall within the targetlongitude coordinate range.

In certain embodiment(s), the project longitude coordinate is aspecified longitude coordinate.

The conversion condition includes: an absolute value of a differencebetween longitude coordinates of adjacent position points is greaterthan a first value, and the first value is a maximum value, i.e., amaximum longitude coordinate, within the first longitude coordinaterange. Since the electronic map is used for describing regions on theearth, and the earth is a sphere, a longitude line where the minimumlongitude coordinate in the electronic map is located coincides with alongitude line where the maximum longitude coordinate is located. If theabsolute value of the difference between the longitude coordinates ofadjacent position points is greater than the first value, it indicatesthat these two adjacent position points are located at two sides of thelongitude line where the minimum longitude coordinate and the maximumlongitude coordinate are located respectively, and the shortest routebetween these two position points is to be a curve that crosses thelongitude line where the minimum longitude coordinate and the maximumlongitude coordinate are located.

However, since plotting may be performed in order of the longitudecoordinates when plotting curves in the electronic map, a curve thatcrosses the longitude line where the minimum longitude coordinate andthe maximum longitude coordinate are located will not be obtained. As aresult, a plotted route is wrong. Therefore, in such a scenario, thecomputing device converts the project longitude coordinate in themultiple position points to the target longitude coordinate range, so asto change the longitude coordinates corresponding to the longitude linethat the route between these two position points crosses.

Since the electronic map has multiple longitude coordinate ranges, andone position point may be described by longitude coordinates withindifferent longitude coordinate ranges, conversion of the longitudecoordinates referred to in the embodiments of the present disclosurerefers to converting longitude coordinates used for describing a certainposition point within one longitude coordinate range to longitudecoordinates also used for describing the position point within anotherlongitude coordinate range.

303: Plot, by the computing device in order of converted longitudecoordinates, a route formed by connecting the multiple position pointsin the electronic map.

Since the computing device has converted the project longitudecoordinate to the target longitude coordinate range, the longitudecoordinates corresponding to the longitude line that the route betweenthese two position points crosses are changed. At this time, a correctshortest route may be plotted in the electronic map in order of theconverted longitude coordinates.

According to the method provided by the embodiments of the presentdisclosure, in response to that the absolute value of the differencebetween the longitude coordinates of adjacent position points is greaterthan the maximum value of the first longitude coordinate range, itindicates that these two adjacent position points are located at twosides of the longitude line where the minimum longitude coordinate andthe maximum longitude coordinate are located, respectively, and ifplotting is performed directly according to the longitude coordinates,there will be a problem that the plotted route has an error. Therefore,in order to plot a correct route, the project longitude coordinate isconverted to the target longitude coordinate range, so that thelongitude coordinates of the multiple position points all fall withinthe target longitude coordinate range, so as to change the longitudecoordinates corresponding to the longitude line that the route betweenthese two position points crosses. At this time, plotting is performedaccording to the converted longitude coordinates, and thus, the shortestroute formed by connecting the multiple position points may be plotted,and the accuracy of route plotting is improved.

FIG. 4 is a flowchart of another route plotting method provided by anembodiment of the present disclosure. An executive subject of thisembodiment of the present disclosure is a computing device. Referring toFIG. 4 , the method includes:

401: Display, by the computing device, an electronic map.

In this embodiment of the present disclosure, the electronic map hasmultiple longitude coordinate ranges. The multiple longitude coordinateranges are determined in different longitude coordinate systems.Therefore, although the multiple longitude coordinate ranges are allused for representing geographical regions in the electronic map, themultiple longitude coordinate ranges are not the same.

402: Determine, by the computing device, multiple position points in theelectronic map.

The multiple position points include a starting point, an end point andway points between the starting point and the end point. The computingdevice acquires longitude coordinates of the multiple position points.The longitude coordinates of the multiple position points fall withinthe first longitude coordinate range of the multiple longitudecoordinate ranges. The first longitude coordinate range includespositive and negative numbers. In this embodiment of the presentdisclosure, it is illustrated by taking the first longitude coordinaterange being a longitude coordinate range from −180° to 180°. In otherembodiments, the first longitude coordinate range may also be otherlongitude coordinate ranges, which will not be limited by theembodiments of the present disclosure.

403: Determine, by the computing device based on a target map regioncurrently displayed in the electronic map, a second longitude coordinaterange corresponding to the target map region.

When the computing device displays the electronic map, the performelectronic map may be displayed or only a portion of a region in theelectronic map may be displayed. Therefore, the computing devicedetermines, from the electronic map, the target map region currentlydisplayed. The computing device determines the second longitudecoordinate range corresponding to the target map region currentlydisplayed. The second longitude coordinate range is used for describingthe target map region. Longitude coordinates within the second longitudecoordinate range increase in sequence. That is, the longitudecoordinates in the second longitude coordinate range are determined inorder of increasing in sequence, and the same longitude line does notcorrespond to different longitude coordinates.

For example, the second longitude coordinate range is “−45° to 0° to45°” or “160° to 180° to 200°” instead of “160° to 180°/−180° to −160°”.

404: For every two adjacent position points of the multiple positionpoints, convert, by the computing device, a project longitude coordinatein longitude coordinates of the two position points to the targetlongitude coordinate range in response to that an absolute value of adifference between the longitude coordinates of the two position pointsis greater than a first value.

The computing device traverses every two adjacent position points of themultiple position points in sequence. For the two adjacent positionpoints currently traversed, the computing device determines the absolutevalue of the difference between the longitude coordinates of these twoposition points. If the absolute value is greater than the first value,that is, the absolute value is greater than a maximum value within thefirst longitude coordinate range, as mentioned in step 302, a curveobtained by plotting directly based on the longitude coordinates ofthese two position points will have an error. Therefore, the computingdevice determines a longitude coordinate in the longitude coordinates ofthe two position points that does not fall within the target longitudecoordinate range, and converts the longitude coordinate that does notfall within the target longitude coordinate range to the targetlongitude coordinate range, so that the longitude coordinates of thesetwo position points both fall within the target longitude coordinaterange.

In one embodiment, the first longitude coordinate range includes a firstsub-range and a second sub-range, and the target longitude coordinaterange includes the second sub-range and a third sub-range. The firstlongitude coordinate range and the second longitude coordinate rangeinclude the coincident second sub-range. The longitude coordinates ofthe multiple position points fall within the first longitude coordinaterange. Therefore, longitude coordinates in the longitude coordinates ofthe multiple position points that do not fall within the secondsub-range are coordinates that do not fall within the target longitudecoordinate range. That is, longitude coordinates that fall within thefirst sub-range are converted to the third sub-range in the targetlongitude coordinate range. Converting the longitude coordinate in thelongitude coordinates of the two position points that does not fallwithin the target longitude coordinate range to the target longitudecoordinate range includes the following two scenarios:

(1) In response to that a maximum value in the third sub-range isgreater than a maximum value in the first sub-range, the computingdevice adds a second value to the longitude coordinate in the longitudecoordinates of the multiple position points that does not fall withinthe second sub-range.

If the maximum value in the third sub-range is greater than the maximumvalue in the first sub-range, it indicates that the longitude coordinatein the third sub-range corresponding to the same position point isgreater than the longitude coordinate in the first sub-rangecorresponding to the position point. Therefore, to convert the longitudecoordinates falling within the first sub-range to the third sub-range, avalue may be added.

The second value is the absolute value of the difference between themaximum value in the third sub-range and the maximum value in the firstsub-range. That is, the longitude coordinate in the third sub-rangecorresponding to the same position point is greater than the longitudecoordinate in the first sub-range corresponding to the position point bythe second value. Therefore, the second value is added to the longitudecoordinates falling within the first sub-range, and thus, the longitudecoordinates converted to the target longitude coordinate range may beobtained.

(2) In response to that the maximum value in the third sub-range is lessthan the maximum value in the first sub-range, the computing devicesubtracts the second value from the longitude coordinate in thelongitude coordinates of the multiple position points that does not fallwithin the second sub-range.

If the maximum value in the third sub-range is less than the maximumvalue in the first sub-range, it indicates that the longitude coordinatein the third sub-range corresponding to the same position point is lessthan the longitude coordinate in the first sub-range corresponding tothe position point. Therefore, to convert the longitude coordinatesfalling within the first sub-range to the third sub-range, a value maybe subtracted.

The second value is the absolute value of the difference between themaximum value in the third sub-range and the maximum value in the firstsub-range. That is, the longitude coordinate in the third sub-rangecorresponding to the same position point is less than the longitudecoordinate in the first sub-range corresponding to the position point bythe second value. Therefore, the second value is subtracted from thelongitude coordinates falling within the first sub-range, and thus, thelongitude coordinates converted to the target longitude coordinate rangemay be obtained.

405: Convert, by the computing device, the longitude coordinates of thetwo position points to the target longitude coordinate range in responseto that the absolute value of the difference between the longitudecoordinates of the two position points is not greater than the firstvalue, and in response to that the longitude coordinates of the twoposition points do not fall within the target longitude coordinate rangeand do not fall within the second longitude coordinate range.

In response to that the absolute value of the difference between thelongitude coordinates of the two position points is not greater than thefirst value, the shortest route between these two position points is acurve that will not cross the longitude line where the minimum longitudecoordinate and the maximum longitude coordinate are located. Thecomputing device determines whether the longitude coordinates of thesetwo position points fall within the target longitude coordinate range ornot, and whether the longitude coordinates of these two position pointsfall within the second longitude coordinate range or not.

If the longitude coordinates of the two position points do not fallwithin the target longitude coordinate range and do not fall within thesecond longitude coordinate range, it indicates that these two positionpoints are at the same side as the position points with the longitudecoordinates converted in step 404, and if the longitude coordinates ofthese two position points are still kept unchanged, an error will occurwhen plotting a curve that connects these two position points with theposition points with the longitude coordinates converted in step 404.Therefore, the computing device also converts the longitude coordinatesof these two position points to the target longitude coordinate range.

If the longitude coordinates of the two position points do not fallwithin the target longitude coordinate range, but fall within the secondlongitude coordinate range, and in response to that the longitudecoordinates of the two position points are converted to the targetlongitude coordinate range, the longitude coordinates of the twoposition points will not fall within the second longitude coordinaterange, thereby influencing a route that connects these two positionpoints with other position points falling within the second longitudecoordinate range. Therefore, in such a scenario, the computing devicemay not execute the step of converting the longitude coordinates of thetwo position points to the target longitude coordinate range.

If the longitude coordinates of the two position points fall within thetarget longitude coordinate range, the computing device may not executethe step of converting the longitude coordinates of the two positionpoints to the target longitude coordinate range.

In one embodiment, the first longitude coordinate range includes thefirst sub-range and the second sub-range, and the target longitudecoordinate range includes the second sub-range and the third sub-range.Converting the longitude coordinates of the two position points to thetarget longitude coordinate range includes the following two scenarios:

(1) In response to that the maximum value in the third sub-range isgreater than the maximum value in the first sub-range, and in responseto that the longitude coordinates of the two position points do not fallwithin the second sub-range and do not fall within the second longitudecoordinate range, the second value is added to the longitude coordinatesof these two position points.

(2) In response to that the maximum value in the third sub-range is lessthan the maximum value in the first sub-range, and in response to thatthe longitude coordinates of the two position points do not fall withinthe second sub-range and do not fall within the second longitudecoordinate range, the second value is subtracted from the longitudecoordinates of these two position points.

The second value is the absolute value of the difference between themaximum value in the third sub-range and the maximum value in the firstsub-range. This step is similar to step 404 in terms of the manner toconvert the longitude coordinates, which will not be repeated here.

In this embodiment of the present disclosure, by executing steps 404 to405, the project longitude coordinate may be converted to the targetlongitude coordinate range in response to that the multiple positionpoints meet the conversion condition.

406: Plot, by the computing device in order of converted longitudecoordinates, a route formed by connecting the multiple position pointsin the electronic map.

Since the computing device has already converted the project longitudecoordinate to the target longitude coordinate range, the longitudecoordinates corresponding to the longitude line that the route betweenthese two position points crosses are changed. Therefore, the correctshortest route may be plotted in the electronic map in order of theconverted longitude coordinates.

In one embodiment, the computing device plots the curve formed byconnecting the multiple position points in the electronic map in orderof the converted longitude coordinates from large to small or in orderof the converted longitude coordinates from small to large, so as toobtain a route between the starting point and the end point.

FIG. 5 is a schematic diagram of a route provided by an embodiment ofthe present disclosure. As shown in FIG. 5 , the starting point is apoint A, the end point is a point B, and there are multiple way pointsbetween the point A and the point B. The multiple way points are a pointC1, a point C2 and a point C3. The computing device connects twoadjacent position points in sequence in order of the converted longitudecoordinates to obtain a broken line segment between the two positionpoints, and a route between the point A and the point B is essentiallyformed by splicing the broken line segments between every two positionpoints.

In one embodiment, the computing device includes a graphics processingunit. The graphics processing unit includes a vertex shader and afragment shader. The computing device acquires coordinates of themultiple position points by the vertex shader, where the coordinates ofthe position points include longitude coordinates and latitudecoordinates. The longitude coordinates of the position points areconverted by the vertex shader, and the converted longitude coordinatesand latitude coordinates are inputted into the fragment shader. Dataamong the multiple position points is rasterized by the fragment shaderaccording to the longitude coordinates and the latitude coordinates toperform pixel-level curve rendering, thereby the route between thestarting point and the end point is plotted in the electronic map, andthe visualization effect of the route is achieved.

According to the method provided by the embodiments of the presentdisclosure, in response to that the absolute value of the differencebetween the longitude coordinates of adjacent position points is greaterthan the maximum value of the first longitude coordinate range, itindicates that these two adjacent position points are located at twosides of the longitude line where the minimum longitude coordinate andthe maximum longitude coordinate are located, respectively, and ifplotting is performed directly according to the longitude coordinates,there will be a problem that the plotted route has an error. Therefore,in order to plot a correct route, the project longitude coordinate isconverted to the target longitude coordinate range, so that thelongitude coordinates of the multiple position points all fall withinthe target longitude coordinate range, so as to change the longitudecoordinates corresponding to the longitude line that the route betweenthese two position points crosses. At this time, plotting is performedaccording to the converted longitude coordinates, and thus, the shortestroute formed by connecting the multiple position points may be plotted,and the accuracy of route plotting is improved.

Moreover, there is the coincident second sub-range between the firstlongitude coordinate range and the target longitude coordinate range,and the first sub-range in the first longitude coordinate range does notcoincide with the second sub-range in the target longitude coordinaterange. Therefore, the longitude coordinates falling within the firstsub-range are converted to the second range by adding or subtracting thesecond value, thereby providing a manner of longitude coordinateconversion, so that it may be guaranteed that the longitude coordinatebefore conversion and the converted longitude coordinate indicate thesame position, that is, the accuracy of longitude coordinate conversionis guaranteed.

Moreover, if the longitude coordinates of the two position points do notfall within the target longitude coordinate range and do not fall withinthe second longitude coordinate range, it indicates that these twoposition points are at the same side as the position points with theconverted longitude coordinates, the longitude coordinates of these twoposition points are also converted to the target longitude coordinaterange, and thereby, it is guaranteed that there is no error whenplotting the route that connects these two position points with theposition points with the converted longitude coordinates, and theaccuracy of route plotting is further improved.

Moreover, in this embodiment of the present disclosure, the correctroute may be plotted by converting the longitude coordinate of at leastone of the multiple position points. Since the processing manner isrelatively simple, no much processing resources will be wasted, and theefficiency of route plotting may also be guaranteed.

In another route plotting method provided by the embodiments of thepresent disclosure, the first longitude coordinate range includespositive numbers and negative numbers, and the target longitudecoordinate range does not include positive numbers or does not includenegative numbers.

Since the first longitude coordinate range includes the positive numbersand the negative numbers, the minimum longitude coordinate is a negativenumber and the maximum longitude coordinate is a positive number.Therefore, the positive numbers are located at one side of the longitudeline where the minimum longitude coordinate and the maximum longitudecoordinate are located, and the negative numbers are located at theother side thereof. If the absolute value of the difference between thelongitude coordinates of adjacent position points is greater than thefirst value, it indicates that these two adjacent position points arelocated at two sides of the longitude line where the minimum longitudecoordinate and the maximum longitude coordinate are located,respectively. The longitude coordinate of one position point is apositive number, while the longitude coordinate of the other positionpoint is a negative number, and the shortest route between these twoposition points is to be a curve that crosses the longitude line wherethe minimum longitude coordinate and the maximum longitude coordinateare located, rather than a curve that crosses the 0° longitude line.However, since plotting may be performed in order of the longitudecoordinates when plotting curves in the electronic map, and thelongitude coordinate of one of two adjacent position points is apositive number, and the longitude coordinate of the other positionpoint is a negative number, the curve that crosses the 0° longitude linewill be obtained during plotting, instead of a curve that crosses thelongitude line where the minimum longitude coordinate and the maximumlongitude coordinate are located. As a result, the shortest routeplotted is wrong.

Therefore, in such a scenario, the computing device converts the projectlongitude coordinate to the target longitude coordinate range by usingthe method provided by the embodiments of the present disclosure. Sincethe target longitude coordinate range does not include the positivenumbers or the negative numbers, there is no case that one of theconverted longitude coordinates is a positive number and the otherconverted longitude coordinate is a negative number. At this time, thecorrect shortest route may be plotted by plotting according to theconverted longitude coordinates, and the accuracy of route plotting isimproved.

For example, the first longitude coordinate range is a longitudecoordinate range from −180° to 180°, the target longitude coordinaterange is a longitude coordinate range from 0° to 360°, or the targetlongitude coordinate range is a longitude coordinate range from −360° to0° or the like. Since the first longitude coordinate range includes thepositive numbers and the negative numbers, the minimum longitudecoordinate is a negative number and the maximum longitude coordinate isa positive number. Therefore, the positive numbers are located at oneside of the longitude line where the minimum longitude coordinate andthe maximum longitude coordinate are located, and the negative numbersare located at the other side thereof.

Taking the first longitude coordinate range being the longitudecoordinate range from −180° to 180° as an example, referring to theelectronic maps as shown in FIG. 6 and FIG. 7 , longitude coordinates ofthe west longitude are negative numbers, and longitude coordinates ofthe east longitude are positive numbers. The −180° longitude linecoincides with the 180° longitude line, and the positive numbers arelocated at one side of the 180° longitude line, and the negative numbersare located at the other side thereof. If the absolute value of thedifference between the longitude coordinates of two adjacent positionpoints is greater than 180°, it indicates that one of the longitudecoordinates of these two position points is the positive number and theother longitude coordinate is the negative number, and these twoposition points are closer to the 180° longitude line rather than the 0°longitude line. As shown in FIG. 6 and FIG. 7 , taking the longitude ofa point A being 135° and the longitude of a point B being −135° as anexample, the shortest route between the point A and the point B is to bea curve that crosses the 180° longitude line. While in the actualplotting process, if the curve between two position points is plotteddirectly in order of the longitude coordinates, a curve that crosses the0° longitude line will be obtained. However, from FIG. 6 and FIG. 7 , itmay be seen that the shortest route between the point A and the point Bis to be the curve that crosses the 180° longitude line. Therefore,direct plotting may result in an error. If −135° is converted to apositive number or 135° is converted to a negative number according tothe method provided by the embodiments of the present disclosure, thecurve that crosses the 180° longitude line may be plotted.

FIG. 8 is a flowchart of another route plotting method provided by anembodiment of the present disclosure. An executive subject of thisembodiment of the present disclosure is a computing device. In thisembodiment of the present disclosure, the first longitude coordinaterange is a longitude coordinate range from −180° to 180°, and the targetlongitude coordinate range is a longitude coordinate range from 0° to360°, the first sub-range is a range from −180° to 0°, the secondsub-range is a range from 0° to 180°, the third sub-range is a rangefrom 180° to 360°, the first value is 180°, and the second value is360°. Referring to FIG. 8 , the method includes:

801: Display, by the computing device, an electronic map.

802: Determine, by the computing device, multiple position points in theelectronic map.

803: Determine, by the computing device based on a target map regioncurrently displayed in the electronic map, a second longitude coordinaterange corresponding to the target map region.

The processes of step 801 to step 803 are similar to those of step 401to step 403, which will not be repeated here.

804: Determine, by the computing device based on the target map regioncurrently displayed in the electronic map, a longitude coordinate of acenter point of the target map region.

The computing device determines, from the electronic map, the target mapregion currently displayed, and determines the longitude coordinate ofthe center point of the target map region. The longitude coordinate ofthe center point fall within the first longitude coordinate range. Sincethe first longitude coordinate range includes the positive numbers andthe negative numbers, the longitude coordinate of the center point maybe greater than 0° or may not be greater than 0°.

805: Determine, by the computing device, a longitude coordinate rangefrom 0° to 360° as a target longitude coordinate range in response tothat the longitude coordinate of the center point is greater than 0°.

The computing device determines whether the longitude coordinate of thecenter point is greater than 0° or not. If the longitude coordinate ofthe center point is greater than 0°, the longitude coordinate range from0° to 360° will be determined, from the multiple longitude coordinateranges of the electronic map, as the target longitude coordinate range.Therefore, the target longitude coordinate range does not includenegative numbers.

806: For every two adjacent position points of the multiple positionpoints, add, by the computing device, 360° to a longitude coordinate inlongitude coordinates of two position points that does not fall withinthe target longitude coordinate range in response to that an absolutevalue of a difference between the longitude coordinates of the twoposition points is greater than 180°.

The computing device traverses every two adjacent position points of themultiple position points in sequence. For two adjacent position pointscurrently traversed, the computing device determines the absolute valueof the difference between the longitude coordinates of these twoposition points. If the absolute value is greater than 180°, andplotting is performed directly based on the longitude coordinates ofthese two position points, a resulting curve will have an error.Therefore, the computing device determines the longitude coordinate inthe longitude coordinates of the two position points that does not fallwithin the target longitude coordinate range, and adds 360° to thelongitude coordinate that does not fall within the target longitudecoordinate range, that is, 360° is added to the longitude coordinatethat is less than 0°, so as to be converted to the target longitudecoordinate range, so that the longitude coordinates of these twoposition points both fall within the target longitude coordinate range.Since the target longitude coordinate range in this embodiment of thepresent disclosure does not include negative numbers, there is no casethat one of the converted longitude coordinates is a positive number andthe other converted longitude coordinate is a negative number.

Since the electronic map is used for representing regions on the earth,and the earth may be regarded as a 360° sphere, a longitude coordinateobtained by adding 360° to the longitude coordinate of one positionpoint still represents the position point, except that the value of thelongitude coordinate has changed. Therefore, while the longitudecoordinate is converted, it is guaranteed that the position point willnot be misplaced.

807: Add, by the computing device, 360° to the longitude coordinates ofthe two position points in response to that the absolute value of thedifference between the longitude coordinates of two position points isnot greater than 180°, and in response to that the longitude coordinatesof the two position points do not fall within the target longitudecoordinate range and do not fall within the second longitude coordinaterange.

In response to that the absolute value of the difference between thelongitude coordinates of the two position points is not greater than180°, the shortest route between these two position points will notcross the 180° longitude line. The computing device determines whetherthe longitude coordinates of these two position points fall within thetarget longitude coordinate range or not, and whether the longitudecoordinates of these two position points fall within the secondlongitude coordinate range or not.

If the longitude coordinates of the two position points do not fallwithin the target longitude coordinate range and do not fall within thesecond longitude coordinate range, it indicates that these two positionpoints are at the same side as the position points with the longitudecoordinates converted in step 806, and if the longitude coordinates ofthese two position points are still kept unchanged, an error will occurwhen plotting a curve that connects these two position points with theposition points with the longitude coordinates converted in step 806.Therefore, the computing device adds 360° to the longitude coordinatesof these two position points, and thereby, the longitude coordinates ofthese two position points are converted to the target longitudecoordinate range.

For example, in step 806, two position points are a point A1 and a pointB1, the longitude coordinate of the point A1 is 170°, the longitudecoordinate of the point B1 is −170°, the target longitude coordinaterange is a longitude coordinate range from 0° to 360°, and the secondlongitude coordinate range is “150° to 180° to 210°”. In step 807, twoposition points are a point C1 and a point D1, the longitude coordinateof the point C1 is −160° and the longitude coordinate of the point D1 is−150°, and the longitude coordinates of the point C1 and the point D1 donot fall within the target longitude coordinate range or the secondlongitude coordinate range. If direct plotting is performed withoutcoordinate conversion, a route between the point A1 and the point B1will have an error, and a route that connects the point B1, the point C1and the point D1 will not have an error. However, 360° is added to thelongitude coordinate of the point B1 by using the method provided by theembodiments of the present disclosure to get 190°. At this time, if thecoordinates of the point C1 and the point D1 still remain unchanged,although the route between the point A1 and the point B1 will not havean error, the route that connects the point B1, the point C1 and thepoint D1 will have an error. Therefore, to guarantee the accuracy of theroute, the computing device will also add 360° to the longitudecoordinates of the point C1 and the point D1. At this time, thelongitude coordinates of the point A1, the point B1, the point C1 andthe point D1 are 170°, 190°, 200° and 210°, respectively. Therefore,there will no error for plotting a route that connects the point A1, thepoint B1, the point C1 and the point D1 in order of the longitudecoordinates.

If the longitude coordinates of the two position points do not fallwithin the target longitude coordinate range, but fall within the secondlongitude coordinate range, and in response to that the longitudecoordinates of the two position points are converted to the targetlongitude coordinate range, the longitude coordinates of the twoposition points will not fall within the second longitude coordinaterange, thereby influencing a route that connects these two positionpoints with other position points falling within the second longitudecoordinate range. Therefore, in such a case, the computing device maynot execute the step of converting the longitude coordinates of the twoposition points to the target longitude coordinate range.

For example, the target longitude coordinate range is a longitudecoordinate range from 0° to 360°, and the second longitude coordinaterange is “−40° to 0° to 40°”. In step 807, two position points are apoint E1 and a point F1, the longitude coordinate of the point E1 is−30° and the longitude coordinate of the point F1 is −20°, and thelongitude coordinates of the point E1 and the point F1 do not fallwithin the target longitude coordinate range, but fall within the secondlongitude coordinate range. The second longitude coordinate rangefurther includes a point G1, and the longitude coordinate of the pointG1 is 10°. At this time, a route that connects the point E1, the pointF1 and the point G1 will not have an error during direct plotting.However, if the computing device converts the coordinates of the pointE1 and the point F1 to the target longitude coordinate range, that is,360° is added to the coordinates, at this time, the longitudecoordinates of the point E1, the point F1 and the point G1 are 330°,340° and 10°, respectively. Although a route between the point E1 andthe point F1 will not have an error, a route between the point F1 andthe point G1 will have an error. Therefore, in this case, the computingdevice will not convert the longitude coordinates of the point E1 andthe point F1.

If the longitude coordinates of the two position points fall within thetarget longitude coordinate range, the computing device may not executethe step of converting the longitude coordinates of the two positionpoints to the target longitude coordinate range.

FIG. 9 is a flowchart of a coordinate conversion method provided by anembodiment of the present disclosure. The first longitude coordinaterange is a longitude coordinate range from −180° to 180°, and the targetlongitude coordinate range is a longitude coordinate range from 0° to360°. Referring to FIG. 9 , the method includes:

901: Acquire, by a computing device, longitude coordinates of multipleposition points.

902: Determine, by the computing device, whether a longitude coordinateof a center point of a target map region is greater than 0° or not. Itis illustrated in FIG. 9 by taking the longitude coordinate of thecenter point of the target map region being greater than 0° as anexample.

903: Determine, by the computing device, whether an absolute value of adifference between longitude coordinates of two adjacent position pointsof the multiple position points is greater than 180° or not, if it isgreater than 180°, perform step 904 below, and if it is not greater than180°, perform step 905 below.

904: Add, by the computing device, 360° to a longitude coordinate in thelongitude coordinates of two position points that is less than 0°.

905: Determine, by the computing device, whether the longitudecoordinates of the two position points are both less than 0° or not andwhether the two position points are both located outside a screen ornot, if so, perform step 906 below, and if not, no processing will bedone. The position point located outside the screen refers to that thelongitude coordinate of the position point does not fall within thesecond longitude coordinate range corresponding to the target map regioncurrently displayed.

906: Add, by the computing device, 360° to the longitude coordinates ofthe two position points.

808: Plot, by the computing device in order of converted longitudecoordinates, a route formed by connecting the multiple position pointsin the electronic map.

According to the method provided by the embodiments of the presentdisclosure, considering that in response to that the longitudecoordinate of the center point is greater than 0°, there are manyposition points with the longitude coordinates greater than 0° in thetarget map region currently displayed, the longitude coordinate rangefrom 0° to 360° is determined as the target longitude coordinate range,thereby reducing the quantity of the position points in the multipleposition points that do not fall within the target longitude coordinaterange, i.e., reducing the quantity of position points that desirecoordinate conversion. As a result, the amount of arithmetic operationsin the route plotting process is reduced, which is conducive toimproving the efficiency of route plotting.

FIG. 10 is a flowchart of yet another route plotting method provided byan embodiment of the present disclosure. An executive subject of thisembodiment of the present disclosure is a computing device. In thisembodiment of the present disclosure, the first longitude coordinaterange is a longitude coordinate range from −180° to 180°, and the targetlongitude coordinate range is a longitude coordinate range from −360° to0°, the first sub-range is a range from 0° to 180°, the second sub-rangeis a range from −180° to 0°, the third sub-range is a range from −360°to −180°, the first value is 180°, and the second value is 360°. Theroute plotting method is illustrated. Referring to FIG. 10 , the methodincludes:

1001: Display, by the computing device, an electronic map.

1002: Determine, by the computing device, multiple position points inthe electronic map.

1003: Determine, by the computing device based on a target map regioncurrently displayed in the electronic map, a second longitude coordinaterange corresponding to the target map region.

Step 1001 to step 1003 are similar to step 401 to step 403, which willnot be repeated here.

1004: Determine, by the computing device based on the target map regioncurrently displayed in the electronic map, a longitude coordinate of acenter point of the target map region.

1005: Determine, by the computing device, a longitude coordinate rangefrom −360° to 0° as a target longitude coordinate range in response tothat the longitude coordinate of the center point is not greater than0°.

The computing device determines whether the longitude coordinate of thecenter point is greater than 0° or not. If the longitude coordinate ofthe center point is not greater than the longitude coordinate range from−360° to 0° will be determined, from the multiple longitude coordinateranges of the electronic map, as the target longitude coordinate range.Therefore, the target longitude coordinate range does not includepositive numbers.

1006: For every two adjacent position points of the multiple positionpoints, subtract, by the computing device, 360° from a longitudecoordinate in longitude coordinates of two position points that does notfall within the target longitude coordinate range in response to that anabsolute value of a difference between the longitude coordinates of thetwo position points is greater than 180°.

The computing device traverses every two adjacent position points of themultiple position points in sequence. For two adjacent position pointscurrently traversed, the computing device determines the absolute valueof the difference between the longitude coordinates of these twoposition points. If the absolute value is greater than 180°, andplotting is performed directly based on the longitude coordinates ofthese two position points, a resulting curve will have an error.Therefore, the computing device determines the longitude coordinate inthe longitude coordinates of the two position points that does not fallwithin the target longitude coordinate range, and subtracts 360° fromthe longitude coordinate that does not fall within the target longitudecoordinate range, that is, 360° is subtracted from the longitudecoordinate that is greater than 0°, so as to be converted to the targetlongitude coordinate range, so that the longitude coordinates of thesetwo position points both fall within the target longitude coordinaterange. Since the target longitude coordinate range in this embodiment ofthe present disclosure does not include positive numbers, there is nocase that one of the converted longitude coordinates is a positivenumber and the other converted longitude coordinate is a negativenumber.

Since the electronic map is used for representing regions on the earth,and the earth may be regarded as a 360° sphere, a longitude coordinateobtained by subtracting 360° from the longitude coordinate of oneposition point still represents the position point, except that thevalue of the longitude coordinate has changed. Therefore, while thelongitude coordinate is converted, it is guaranteed that the positionpoint will not be misplaced.

1007: Subtract, by the computing device, 360° from the longitudecoordinates of the two position points in response to that the absolutevalue of the difference between the longitude coordinates of twoposition points is not greater than 180°, and in response to that thelongitude coordinates of the two position points do not fall within thetarget longitude coordinate range and do not fall within the secondlongitude coordinate range.

In response to that the absolute value of the difference between thelongitude coordinates of the two position points is not greater than180°, the shortest route between these two position points will notcross the 180° longitude line. The computing device determines whetherthe longitude coordinates of these two position points fall within thetarget longitude coordinate range or not, and whether the longitudecoordinates of these two position points fall within the secondlongitude coordinate range or not.

If the longitude coordinates of the two position points do not fallwithin the target longitude coordinate range and do not fall within thesecond longitude coordinate range, it indicates that these two positionpoints are at the same side as the position points with the longitudecoordinates converted in step 1006, and if the longitude coordinates ofthese two position points are still kept unchanged, an error will occurwhen plotting a curve that connects these two position points with theposition points with the longitude coordinates converted in step 1006.Therefore, the computing device subtracts 360° from the longitudecoordinates of these two position points, and thereby, the longitudecoordinates of these two position points are converted to the targetlongitude coordinate range.

For example, in step 1006, two position points are a point A2 and apoint B2, the longitude coordinate of the point A2 is −170°, thelongitude coordinate of the point B2 is 170°, the target longitudecoordinate range is a longitude coordinate range from −360° to 0°, andthe second longitude coordinate range is “−210° to −180° to −150°”. Instep 1007, two position points are a point C2 and a point D2, thelongitude coordinate of the point C2 is 160° and the longitudecoordinate of the point D2 is 150°, and the longitude coordinates of thepoint C2 and the point D2 do not fall within the target longitudecoordinate range or the second longitude coordinate range. If directplotting is performed without coordinate conversion, a route between thepoint A2 and the point B2 will have an error, and a route that connectsthe point B2, the point C2 and the point D2 will not have an error.However, 360° is subtracted from the longitude coordinate of the pointB2 by using the method provided by the embodiments of the presentdisclosure to get −190°. At this time, if the coordinates of the pointC2 and the point D2 still remain unchanged, although the route betweenthe point A2 and the point B2 will not have an error, the route thatconnects the point B2, the point C2 and the point D2 will have an error.Therefore, to guarantee the accuracy of the route, the computing devicewill also subtract 360° from the longitude coordinates of the point C2and the point D2. At this time, the longitude coordinates of the pointA2, the point B2, the point C2 and the point D2 are −170°, −190°, −200°and −210°, respectively. Therefore, there will not error for plotting aroute that connects the point A2, the point B2, the point C2 and thepoint D2 in order of the longitude coordinates.

If the longitude coordinates of the two position points do not fallwithin the target longitude coordinate range, but fall within the secondlongitude coordinate range, and in response to that the longitudecoordinates of the two position points are converted to the targetlongitude coordinate range, the longitude coordinates of the twoposition points will not fall within the second longitude coordinaterange, thereby influencing a route that connects these two positionpoints with other position points falling within the second longitudecoordinate range. Therefore, in such a case, the computing device maynot execute the step of converting the longitude coordinates of the twoposition points to the target longitude coordinate range.

For example, the target longitude coordinate range is a longitudecoordinate range from −360° to 0°, and the second longitude coordinaterange is “−40° to 0° to 40°”. In step 1007, two position points are apoint E2 and a point F2, the longitude coordinate of the point E2 is 30°and the longitude coordinate of the point F2 is 20°, and the longitudecoordinates of the point E2 and the point F2 do not fall within thetarget longitude coordinate range, but fall within the second longitudecoordinate range. The second longitude coordinate range further includesa point G2, and the longitude coordinate of the point G2 is −10°. Atthis time, a route that connects the point E2, the point F2 and thepoint G2 will not have an error during direct plotting. However, if thecomputing device converts the coordinates of the point E2 and the pointF2 to the target longitude coordinate range, that is, 360° is subtractedfrom the coordinates, at this time, the longitude coordinates of thepoint E2, the point F2 and the point G2 are −330°, −340° and −10°,respectively. Although a route between the point E2 and the point F2will not have an error, a route between the point F2 and the point G2will have an error. Therefore, in this case, the computing device willnot convert the longitude coordinates of the point E2 and the point F2.

If the longitude coordinates of the two position points fall within thetarget longitude coordinate range, the computing device may not executethe step of converting the longitude coordinates of the two positionpoints to the target longitude coordinate range.

FIG. 11 is a flowchart of another coordinate conversion method providedby an embodiment of the present disclosure. The first longitudecoordinate range is a longitude coordinate range from −180° to 180°, andthe target longitude coordinate range is a longitude coordinate rangefrom −360° to 0°. Referring to FIG. 11 , the method includes:

1101: Acquire, by a computing device, longitude coordinates of multipleposition points.

1102: Determine, by the computing device, whether a longitude coordinateof a center point of a target map region is greater than 0° or not. Itis illustrated in FIG. 11 by taking the longitude coordinate of thecenter point of the target map region being not greater than 0° as anexample.

1103: Determine, by the computing device, whether an absolute value of adifference between longitude coordinates of two adjacent position pointsof the multiple position points is greater than 180° or not, if it isgreater than 180°, perform step 1104 below, and if it is not greaterthan 180°, perform step 1105 below.

1104: Subtract, by the computing device, 360° from a longitudecoordinate in the longitude coordinates of two position points that isgreater than 0°.

1105: Determine, by the computing device, whether the longitudecoordinates of the two position points are both less than 0° or not andwhether the two position points are both located outside a screen ornot, if so, perform step 1106 below, and if not, no processing will bedone. The position point located outside the screen refers to that thelongitude coordinate of the position point does not fall within thesecond longitude coordinate range corresponding to the target map regioncurrently displayed.

1106: Subtract, by the computing device, 360° from the longitudecoordinates of the two position points.

1008: Plot, by the computing device in order of converted longitudecoordinates, a route formed by connecting the multiple position pointsin the electronic map.

According to the method provided by the embodiments of the presentdisclosure, considering that in response to that the longitudecoordinate of the center point is less than 0°, there are many positionpoints with the longitude coordinates less than 0° in the target mapregion currently displayed, the longitude coordinate range from −360° to0° is determined as the target longitude coordinate range, therebyreducing the quantity of the position points in the multiple positionpoints that do not fall within the target longitude coordinate range,i.e., reducing the quantity of position points that desire coordinateconversion. As a result, the amount of arithmetic operations in theroute plotting process is reduced, which is conducive to improving theefficiency of route plotting.

FIG. 12 is a flowchart of still another route plotting method providedby an embodiment of the present disclosure. An executive subject of thisembodiment of the present disclosure is a computing device. Referring toFIG. 12 , the method includes:

1201: Display, by the computing device, an electronic map.

1202: Determine, by the computing device, multiple position points inthe electronic map.

1203: Convert, by the computing device, a project longitude coordinateto the target longitude coordinate range in response to that themultiple position points meet a conversion condition.

Steps 1201 to 1203 are similar to steps 401 to 405, steps 801 to 807, orsteps 1001 to 1007, which will not be repeated here.

1204: For each of the multiple position points, change, by the computingdevice, a latitude coordinate of the position point to a maximumlatitude coordinate in response to that the latitude coordinate of theposition point is greater than the maximum latitude coordinate of theelectronic map.

The computing device will also acquire the latitude coordinate of eachposition point, and the maximum latitude coordinate of the electronicmap. The computing device traverses each of the multiple position pointsin sequence. For the position point currently traversed, if the latitudecoordinate of the position point is greater than the maximum latitudecoordinate of the electronic map, the computing device may not plot theposition point in the electronic map subsequently. As a result, routesbetween the position point and other position points may not be plottedor are incomplete when plotting the route between the starting point andthe end point. Therefore, the computing device changes the latitudecoordinate of the position point to the maximum latitude coordinate ofthe electronic map, so that the position point and the routes betweenthe position point and other position points may be plotted in theelectronic map subsequently, thereby achieving a visualization effect ofroute plotting.

1205: For each of the multiple position points, change, by the computingdevice, the latitude coordinate of the position point to a minimumlatitude coordinate in response to that the latitude coordinate of theposition point is less than the minimum latitude coordinate of theelectronic map.

Similar to step 1204, if the latitude coordinate of the position pointis less than the minimum latitude coordinate of the electronic map, thecomputing device may not plot the position point in the electronic mapsubsequently. As a result, routes between the position point and otherposition points may not be plotted or are incomplete when plotting theroute between the starting point and the end point. Therefore, thecomputing device changes the latitude coordinate of the position pointto the minimum latitude coordinate of the electronic map, so that theposition point and the routes between the position point and otherposition points may be plotted in the electronic map subsequently,thereby achieving a visualization effect of route plotting.

The electronic map is obtained by projecting the earth onto a plane,while there will be a loss of some information due to projecting thesurface of a sphere onto a plane. For example, the latitude range of theearth is from −90° to 90°, and the electronic map obtained afterprojecting does not include information about the Antarctic and Arcticregions of the earth. The latitude range of the electronic map is from−85° to 85°. If the latitude coordinate of a point M of the multipleposition points is 90°, the computing device changes the latitudecoordinate of the point M to 85°. If the latitude coordinate of a pointN of the multiple position points is −90°, the computing device changesthe latitude coordinate of the point N to −85°.

The embodiments of the present disclosure are illustrated by takingperforming step 1204 and step 1205 as an example. In another embodiment,the computing device may also only perform step 1204, but skipperforming step 1205, or only perform step 1205, but skip performingstep 1204, which will not be limited by the embodiments of the presentdisclosure.

1206: Plot, by the computing device in order of converted longitudecoordinates, a route formed by connecting the multiple position pointsin the electronic map.

According to the method provided by the embodiments of the presentdisclosure, in response to that the latitude coordinate of the positionpoint is greater than the maximum latitude coordinate of the electronicmap, the latitude coordinate of the position point is changed to themaximum latitude coordinate, so that the position point and the routesbetween the position point and other position points may be plotted inthe electronic map subsequently, thereby improving the visualizationeffect of route plotting.

Moreover, in response to that the latitude coordinate of the positionpoint is less than the minimum latitude coordinate of the electronicmap, the latitude coordinate of the position point is changed to theminimum latitude coordinate, so that the position point and the routesbetween the position point and other position points may be plotted inthe electronic map subsequently, thereby improving the visualizationeffect of route plotting.

FIG. 13 is a flowchart of a position point determination method providedby an embodiment of the present disclosure. An executive subject of thisembodiment of the present disclosure is a computing device. In thisembodiment of the present disclosure, the multiple position pointsinclude a starting point, an end point and way points between thestarting point and the end point. Referring to FIG. 13 , the methodincludes:

1301: Display, by the computing device, an electronic map.

1302: Acquire, by the computing device in response to a route plottingrequest based on the electronic map, a starting point and an end pointcorresponding to the route plotting request.

The route plotting request is used for requesting the plotting of aroute between the starting point and the end point in the electronicmap.

In one embodiment, the electronic map includes the name of eachposition, and the route plotting request carries a first position nameand a second position name, where the first position name indicates thestarting point and the second position name indicates the end point. Thecomputing device acquires the first position name and the secondposition name in the route plotting request, queries in the electronicmap for the starting point corresponding to the first position name andthe end point corresponding to the second position name, and determinescoordinates of the starting point and coordinates of the end point,where the coordinates include a longitude coordinate and a latitudecoordinate.

1303. Determine, by the computing device, a target quantity.

The target quantity indicates the quantity of first way pointsdetermined between the starting point and the end point.

In one embodiment, the computing device determines, based on the targetmap region currently displayed in the electronic map, a maximumlongitude coordinate difference and a maximum latitude coordinatedifference of the target map region, determines a target longitudecoordinate difference between the starting point and the end point, anda target latitude coordinate difference between the starting point andthe end point, and determines, based on the maximum longitude coordinatedifference, the maximum latitude coordinate difference, the targetlongitude coordinate difference and the target latitude coordinatedifference, the target quantity.

In order to determine an appropriate quantity of first way pointsbetween the starting point and the end point, the computing devicerefers to the maximum longitude coordinate difference and the maximumlatitude coordinate difference of the target map region currentlydisplayed, as well as the target longitude coordinate difference and thetarget latitude coordinate difference between the starting point and theend point, therefore, subsequent fitting of the way points between thestarting point and the end point according to the obtained targetquantity matches the size of the map region currently displayed, therebyobtaining a better fitting result.

In certain embodiment(s), the determining, by the computing device,based on the maximum longitude coordinate difference, the maximumlatitude coordinate difference, the target longitude coordinatedifference and the target latitude coordinate difference, the targetquantity includes: determining a first ratio between the targetlongitude coordinate difference and the maximum longitude coordinatedifference, and a second ratio between the target latitude coordinatedifference and the maximum latitude coordinate difference, anddetermining, based on the first ratio and the second ratio, the targetquantity. The target quantity is positively correlated with the maximumvalue of the first ratio and the second ratio.

For example, the computing device determines the target quantity byusing the following formula.

${Num} = \lbrack {\max( {\frac{x}{m \cdot 20},\frac{y}{n \cdot 20}} )} \rbrack$

Num represents the target quantity, x represents the target longitudecoordinate difference, y represents the target latitude coordinatedifference, m represents the maximum longitude coordinate difference, nrepresents the maximum latitude coordinate difference, max(·) representstaking the maximum value, and [·] represents a rounding operation.

1304: Determine, by the computing device, coordinates of the targetquantity of first way points between the starting point and the endpoint according to the coordinates of the starting point and thecoordinates of the end point.

After determining the target quantity, the computing device determinesthe coordinates of the target quantity of first way points between thestarting point and the end point according to the coordinates of thestarting point and the coordinates of the end point. The coordinatesinclude a longitude coordinate and a latitude coordinate.

In one embodiment, the computing device fits the coordinates of thefirst way points between the starting point and the end point insequence according to a great circle arc line fitting algorithm toobtain the coordinates of the target quantity of first way points. Thetarget quantity of first way points are the way points on a great circlearc line between the starting point and the end point.

In another embodiment, after obtaining the target quantity of first waypoints, the computing device determines a distance between every twoadjacent first way points. In response to that the distance between twoadjacent first way points is less than a threshold distance, thecomputing device discards one of these two first way points. Since oneway point is still reserved, the subsequent plotting effect will not beinfluenced. Therefore, on the premise of not influencing the plottingeffect, the quantity of the way points is reduced, and the computationamount of route plotting is reduced.

1305: Determine, by the computing device from the starting point, theend point and the at least one first way point, coordinates of at leastone second way point between every two adjacent position points inparallel according to coordinates of every two adjacent position points.

After determining the starting point, the end point and the first waypoints between the starting point and the end point, the computingdevice determines, from the multiple position points, the coordinates ofat least one second way point between every two adjacent position pointsin parallel according to the coordinates of every two adjacent positionpoints. Therefore, by performing step 1304 and step 1305, the computingdevice obtains at least one first way point and at least one second waypoint between the starting point and the end point.

The process of determining the first way points in step 1304 may beregarded as a fitting process of coarse precision, and the process ofdetermining the second way points in step 1305 may be regarded as afitting process of fine precision. Since the computing device fits thesecond way points between every two adjacent position points in parallelin step 1305, multiple second way points may be fitted outsimultaneously. Therefore, the fitting process of the way points isdivided into two stages in this embodiment of the present disclosure. Inthe first stage, the way points between the starting point and the endpoint are fitted in sequence, and in the second stage, the way pointsbetween two adjacent position points are fitted in parallel, therebyachieving the effect of fitting multiple way points simultaneously. As aresult, the fitting speed of the way points is improved.

For example, the starting point is a point A, and the end point is apoint B. In the first stage, the computing device fits out a point C anda point D between the point A and the point B. At this time, thecomputing device obtains the point A, the point C, the point D and thepoint B arranged in sequence. In the second stage, the computing devicefits way points between the point A and the point C, way points betweenthe point C and the point D and way points between the point D and thepoint B in parallel.

In this embodiment of the present disclosure, by performing steps 1304to 1305, the coordinates of the way points between the starting pointand the end point may be determined according to the coordinates of thestarting point and the coordinates of the end point.

In one embodiment, the computing device determines the multiple waypoints between the starting point and the end point by collaborationbetween a central processing unit (CPU) and a graphics processing unit(GPU). As shown in FIG. 14 , steps 1304 to 1305 may be replaced withsteps 1401 to 1404 below.

1401: Determine, by a central processing unit, coordinates of at leastone first way point between a starting point and an end point accordingto coordinates of the starting point and coordinates of the end point.

1402: Store, by the central processing unit, the coordinates of thestarting point, the coordinates of the end point and the coordinates ofthe at least one first way point in an internal memory buffer space.

In certain embodiment(s), the coordinates determined by the centralprocessing unit are 64-bit floating-point values. The central processingunit firstly converts the coordinates from the 64-bit floating-pointvalues to 32-bit floating-point values, and stores the convertedcoordinates in the internal memory buffer space.

1403: Acquire, by a graphics processing unit, the coordinates of thestarting point, the coordinates of the end point and the coordinates ofthe at least one first way point in the internal memory buffer space.

1404: Determine, by the graphics processing unit, from the startingpoint, the end point and the at least one first way point, coordinatesof at least one second way point between every two adjacent positionpoints in parallel according to coordinates of every two adjacentposition points.

Considering that the graphics processing unit has the ability to fit theposition points in parallel, complex fitting arithmetic operations ofthe position point are transferred to the graphics processing unit formulti-channel parallel processing, thereby improving the fitting speedof the position points.

In certain embodiment(s), the graphics processing unit includes a vertexshader and a fragment shader. The computing device performs the fittingarithmetic operations of the position point by the vertex shader toobtain the coordinates of the at least one second way point betweenevery two adjacent position points. The coordinates of at least one ofthese position points such as the starting point, the end point, thefirst way points and the second way points are converted by the vertexshader by using the method in the embodiment, and the convertedcoordinates are inputted into the fragment shader. A curve that connectsthe multiple position points is plotted in an electronic map by thefragment shader according to the coordinates of the multiple positionpoints, thereby obtaining the route between the starting point and theend point.

According to the method provided by the embodiments of the presentdisclosure, the fitting process of the way points is divided into twostages. In the first stage, the way points between the starting pointand the end point are fitted in sequence, and in the second stage, theway points between two adjacent position points are fitted in parallel,thereby achieving the effect of fitting multiple way pointssimultaneously. As a result, the fitting duration of the way points isshortened, and the fitting speed of the way points is improved.

Moreover, when the quantity of the first way points fitted isdetermined, reference is made to the maximum longitude coordinatedifference and the maximum latitude coordinate difference of the targetmap region currently displayed, as well as the target longitudecoordinate difference and the target latitude coordinate differencebetween the starting point and the end point, therefore, subsequentfitting of the way points between the starting point and the end pointaccording to the obtained target quantity matches the size of the mapregion currently displayed, thereby obtaining a better fitting result.

Moreover, in response to that the distance between two adjacent firstway points is less than a threshold distance, one of these two first waypoints is discarded. Since one way point is still reserved, thesubsequent plotting effect will not be influenced. Therefore, on thepremise of not influencing the plotting effect, the quantity of the waypoints is reduced, and the computation amount of route plotting isreduced.

The route plotting method provided by the embodiments of the presentdisclosure may be applied to any scenario of plotting a route in theelectronic map.

For example, a scenario of plotting the shortest navigation route in theelectronic map. Usually, airplanes or ships navigate along the shortestnavigation route between the starting point and the end point. Theshortest navigation route is a great circle course line between thestarting point and the end point, where the longitude coordinates of thestarting point and the end point both fall within −180° to 180°. If the180° longitude line is crossed between the starting point and the endpoint, and there is a sudden change of 180° to −180° between thelongitude coordinates of the starting point and the end point, one ofthe longitude coordinates of the starting point and the end point is apositive number, and the other longitude coordinate is a negativenumber. Thus, when the great circle course line is plotted according tothe magnitude of the longitude coordinates, there will be positionoffset or dislocation of the plotted course line.

Therefore, a longitude coordinate in the longitude coordinates of thestarting point and the end point that is less than 0 may be converted toa positive number by using the route plotting method provided by theembodiments of the present disclosure in response to that the 180°longitude line is crossed between the starting point and the end point,and thereby, the longitude coordinates of the starting point and the endpoint may be constrained to be between 0° and 360°, or a longitudecoordinate in the longitude coordinates of the starting point and theend point that is greater than 0 is converted to a negative number, andthe longitude coordinates of the starting point and the end point areconstrained to be between −360° and 0°. There is no sudden change of180° to −180° between the converted longitude coordinates. Therefore, acorrect great circle course line may be obtained by performing plottingaccording to the converted longitude coordinates.

A route plotting method provided by the embodiments of the presentdisclosure may include multiple implementations. For example, a routeplotting interface is developed in a Web open map engine JavaScript APIGL. The route plotting interface provides the route plotting capability.The route plotting interface is introduced into an applicationprogramming interface (API) framework of an electronic map of aterminal, and the terminal may implement route plotting subsequently byusing the route plotting interface. As shown in FIG. 15 , the routeplotting method includes:

1501: Call, by a terminal, a route plotting interface.

1502: Input, by the terminal, data of an electronic map, and patterndata of a route.

1503: Request, by the terminal, to plot a great circle arc line betweena starting point and an end point.

1504: Display, by the terminal, the great circle arc line between thestarting point and the end point plotted in the electronic map.

Therefore, the visualization of the great circle arc line between thestarting point and the end point may be implemented in the electronicmap by calling the route plotting interface through the terminal. Forexample, a visualization solution for the navigation route of anairplane is provided, or a visualization solution for the navigationroute of a ship is provided. For example, the terminal may display theplotted great circle arc line in interfaces such as WebView in a miniprogram, a web or an application (APP).

FIG. 16 is a schematic diagram of an electronic map interface providedby an embodiment of the present disclosure. The electronic map andmultiple great circle arc lines plotted in the electronic map aredisplayed in the electronic map interface, as shown in FIG. 16 . Sincethe electronic map is obtained by projecting the surface of the earthonto a plane, the great circle arc line between two position points arenot a straight line between the two position points, but a curve with aradian. FIG. 17 is a schematic diagram of another electronic mapinterface provided by an embodiment of the present disclosure. Theelectronic map and great circle arc lines between each starting pointand a corresponding end point in historical trips of a usercorresponding to a user account, as well as 891 historical trips,12316175 kilometers in mileage of the historical trips, and 38 citiesreached are displayed in the electronic map interface.

FIG. 18 is a schematic structural diagram of a route plotting apparatusprovided by an embodiment of the present disclosure. Referring to FIG.18 , the apparatus includes:

-   -   a position point determination module 1801, configured to        determine multiple position points in an electronic map, the        electronic map having a first longitude coordinate range and a        target longitude coordinate range, and longitude coordinates of        the multiple position points falling within the first longitude        coordinate range;    -   a coordinate conversion module 1802, configured to convert a        project longitude coordinate to the target longitude coordinate        range in response to that the multiple position points meet a        conversion condition, the conversion condition including: an        absolute value of a difference between longitude coordinates of        adjacent position points is greater than a first value, the        first value being a maximum value within the first longitude        coordinate range; and the project longitude coordinate is a        longitude coordinate in the longitude coordinates of the        multiple position points that does not fall within the target        longitude coordinate range; and    -   a route plotting module 1803, configured to plot, in order of        converted longitude coordinates, a route formed by connecting        the multiple position points in the electronic map.

According to the route plotting apparatus provided by the embodiments ofthe present disclosure, in response to that the absolute value of thedifference between the longitude coordinates of adjacent position pointsis greater than the maximum value of the first longitude coordinaterange, it indicates that these two adjacent position points are locatedat two sides of the longitude line where the minimum longitudecoordinate and the maximum longitude coordinate are located,respectively, and if plotting is performed directly according to thelongitude coordinates, there will be a problem that the plotted routehas an error. Therefore, in order to plot a correct route, the projectlongitude coordinate is converted to the target longitude coordinaterange, so that the longitude coordinates of the multiple position pointsall fall within the target longitude coordinate range, so as to changethe longitude coordinates corresponding to the longitude line that theroute between these two position points crosses. At this time, plottingis performed according to the converted longitude coordinates, and thus,the shortest route formed by connecting the multiple position points maybe plotted, and the accuracy of route plotting is improved.

In certain embodiment(s), referring to FIG. 19 , the first longitudecoordinate range includes a first sub-range and a second sub-range, andthe target longitude coordinate range includes the second sub-range anda third sub-range. The coordinate conversion module 1802 includes:

-   -   a coordinate conversion unit 1812, configured to add, in        response to that a maximum value in the third sub-range is        greater than a maximum value in the first sub-range, a second        value to a longitude coordinate in the longitude coordinates of        the multiple position points that does not fall within the        second sub-range; or,    -   the coordinate conversion unit 1812, configured to subtract, in        response to that the maximum value in the third sub-range is        less than the maximum value in the first sub-range, the second        value from the longitude coordinate in the longitude coordinates        of the multiple position points that does not fall within the        second sub-range;    -   where the second value is an absolute value of a difference        between the maximum value in the third sub-range and the maximum        value in the first sub-range.

In certain embodiment(s), referring to FIG. 19 , the coordinateconversion module 1802 includes:

-   -   a range determination unit 1822, configured to determine, based        on a target map region currently displayed in an electronic map,        a second longitude coordinate range corresponding to the target        map region, longitude coordinates within the second longitude        coordinate range increasing in sequence; and    -   a coordinate conversion unit 1812, configured to, for every two        adjacent position points of the multiple position points,    -   convert a longitude coordinate in longitude coordinates of two        position points that does not fall within a target longitude        coordinate range to the target longitude coordinate range in        response to that an absolute value of a difference between the        longitude coordinates of the two position points is greater than        a first value; and    -   convert the longitude coordinates of the two position points to        the target longitude coordinate range in response to that the        absolute value of the difference between the longitude        coordinates of the two position points is not greater than the        first value, and in response to that the longitude coordinates        of the two position points do not fall within the target        longitude coordinate range and do not fall within the second        longitude coordinate range.

In certain embodiment(s), referring to FIG. 19 , the first longitudecoordinate range includes a first sub-range and a second sub-range, andthe target longitude coordinate range includes the second sub-range anda third sub-range. The coordinate conversion unit 1812 is configured to:

-   -   add a second value to the longitude coordinates of the two        position points in response to that a maximum value in the third        sub-range is greater than a maximum value in the first        sub-range, and in response to that the longitude coordinates of        the two position points do not fall within the second sub-range        and do not fall within the second longitude coordinate range;        or,    -   subtract the second value from the longitude coordinates of the        two position points in response to that the maximum value in the        third sub-range is less than the maximum value in the first        sub-range, and in response to that the longitude coordinates of        the two position points do not fall within the second sub-range        and do not fall within the second longitude coordinate range;    -   where the second value is an absolute value of a difference        between the maximum value in the third sub-range and the maximum        value in the first sub-range.

In certain embodiment(s), the first longitude coordinate range includespositive numbers and negative numbers, and the target longitudecoordinate range does not include positive numbers or does not includenegative numbers.

In certain embodiment(s), referring to FIG. 19 , the apparatus furtherincludes:

-   -   a center point determination module 1804, configured to        determine, based on a target map region currently displayed in        the electronic map, a longitude coordinate of a center point of        the target map region, the longitude coordinate of the center        point falling within the first longitude coordinate range; and    -   a range determination module 1805, configured to determine a        longitude coordinate range from 0° to 360° as the target        longitude coordinate range in response to that the longitude        coordinate of the center point is greater than 0°; and    -   the range determination module 1805 is further configured to        determine a longitude coordinate range from −360° to 0° as the        target longitude coordinate range in response to that the        longitude coordinate of the center point is not greater than 0°.

In certain embodiment(s), referring to FIG. 19 , the apparatus furtherincludes a coordinate change module 1806, configured to perform at leastone of the following operations:

-   -   changing, for each of the multiple position points, a latitude        coordinate of the position point to a maximum latitude        coordinate in response to that the latitude coordinate of the        position point is greater than the maximum latitude coordinate        of the electronic map; and    -   changing, for each of the multiple position points, the latitude        coordinate of the position point to a minimum latitude        coordinate in response to that the latitude coordinate of the        position point is less than the minimum latitude coordinate of        the electronic map.

In certain embodiment(s), referring to FIG. 19 , a route plotting module1803 is configured to plot a route formed by connecting multipleposition points in the electronic map in order of converted longitudecoordinates from large to small or in order of the converted longitudecoordinates from small to large.

In certain embodiment(s), referring to FIG. 19 , the multiple positionpoints include a starting point, an end point and way points between thestarting point and the end point. The apparatus further includes:

-   -   a request response module 1807, configured to acquire, in        response to a route plotting request based on the electronic        map, a starting point and an end point corresponding to the        route plotting request; and    -   a coordinate determination module 1808, configured to determine        coordinates of way points between the starting point and the end        point according to coordinates of the starting point and        coordinates of the end point, the coordinates including a        longitude coordinate and a latitude coordinate.

In certain embodiment(s), referring to FIG. 19 , the coordinatedetermination module 1808 includes:

-   -   a first determination unit 1818, configured to determine        coordinates of at least one first way point between the starting        point and the end point according to the coordinates of the        starting point and the coordinates of the end point; and    -   a second determination unit 1828, configured to determine, from        the starting point, the end point and the at least one first way        point, coordinates of at least one second way point between        every two adjacent position points in parallel according to        coordinates of every two adjacent position points.

In certain embodiment(s), referring to FIG. 19 , the quantity of thefirst way points is a target quantity, and the apparatus furtherincludes:

-   -   a coordinate difference determination module 1809, configured to        determine, based on the target map region currently displayed in        the electronic map, a maximum longitude coordinate difference        and a maximum latitude coordinate difference of the target map        region;    -   the coordinate difference determination module 1809 is further        configured to determine a target longitude coordinate difference        between the starting point and the end point, and a target        latitude coordinate difference between the starting point and        the end point; and    -   a quantity determination module 18010, configured to determine,        based on the maximum longitude coordinate difference, the        maximum latitude coordinate difference, the target longitude        coordinate difference and the target latitude coordinate        difference, the target quantity.

In certain embodiment(s), referring to FIG. 19 , the quantitydetermination module 18010 includes:

-   -   a ratio determination unit 18110, configured to determine a        first ratio between the target longitude coordinate difference        and the maximum longitude coordinate difference, and a second        ratio between the target latitude coordinate difference and the        maximum latitude coordinate difference; and    -   a quantity determination unit 18210, configured to determine,        based on the first ratio and the second ratio, the target        quantity, the target quantity being positively correlated with        the maximum value of the first ratio and the second ratio.

In certain embodiment(s), referring to FIG. 19 , the operation ofdetermining coordinates of at least one first way point between thestarting point and the end point according to coordinates of thestarting point and coordinates of the end point is executed by a centralprocessing unit, and the operation of determining, from the startingpoint, the end point and the at least one first way point, coordinatesof at least one second way point between every two adjacent positionpoints in parallel according to coordinates of every two adjacentposition points is executed by a graphics processing unit.

The apparatus further includes:

-   -   a coordinate storage module 18011, configured to store, by the        central processing unit, the coordinates of the starting point,        the coordinates of the end point and the coordinates of the at        least one first way point in an internal memory buffer space;        and    -   a coordinate acquisition module 18012, configured to acquire, by        the graphics processing unit, the coordinates of the starting        point, the coordinates of the end point and the coordinates of        the at least one first way point in the internal memory buffer        space.

The route plotting apparatus provided by the embodiments is onlyillustrated with the division of the functional modules when plottingroutes. In implementation, the functions may be allocated to andperformed by different functional modules as desirable. That is, aninternal structure of the computing device is divided into differentfunctional modules to perform all or some of the functions described. Inaddition, the route plotting apparatus and route plotting methodembodiments provided by the embodiments belong to the same conception.For details of a specific implementation process, refer to the methodembodiments, which will not be repeated here.

The embodiments of the present disclosure further provide a computingdevice. The computing device includes a processor and a memory. Thememory stores at least one computer program. The at least one computerprogram is loaded and executed by the processor to implement theoperations performed in the route plotting method of the embodiments.

In certain embodiment(s), the computing device is provided as aterminal. FIG. 20 shows a schematic structural diagram of a terminal2000 provided by an exemplary embodiment of the present disclosure.

The terminal 2000 includes: a processor 2001 and a memory 2002.

The processor 2001 may include one or more processing cores, forexample, a 4-core processor or an 8-core processor. The processor 2001may be implemented in at least one hardware form of digital signalprocessing (DSP), a field programmable gate array (FPGA) and aprogrammable logic array (PLA). The processor 2001 may also include amain processor and a coprocessor. The main processor is a processorconfigured to process data in an awake state, and is also referred to asa central processing unit (CPU). The coprocessor is a low powerconsumption processor configured to process data in a standby state. Insome embodiments, the processor 2001 may be integrated with a graphicsprocessing unit (GPU, an interaction unit for graphics processing). TheGPU is responsible for rendering and plotting content that may bedisplayed in a display screen. In some embodiments, the processor 2001may further include an artificial intelligence (AI) processor. The AIprocessor is configured to process computing operations related tomachine learning.

The memory 2002 may include one or more computer-readable storage media.The computer-readable storage medium may be non-transient. The memory2002 may further include a high-speed random access memory and anonvolatile memory, for example, one or more disk storage devices orflash storage devices. In some embodiments, a non-transientcomputer-readable storage medium in the memory 2002 is configured tostore at least one computer program, and the at least one computerprogram is used by the processor 2001 to implement the route plottingmethod provided by the method embodiments of the present disclosure.

In some embodiments, the terminal 2000 may further include: a peripheralinterface 2003 and at least one peripheral device. The processor 2001,the memory 2002 and the peripheral interface 2003 may be connected by abus or a signal cable. Each peripheral device may be connected with theperipheral interface 2003 by a bus, a signal cable, or a circuit board.In certain embodiment(s), the peripheral device includes: at least oneof a radio frequency circuit 2004, a display screen 2005, a cameracomponent 2006, an audio circuit 2007 and a power supply 2008.

A person skilled in the art may understand that the structure shown inFIG. 20 does not constitute a limitation on the terminal 2000, and mayinclude more or fewer components than shown, or combine certaincomponents, or adopt different component arrangements.

The embodiments of the present disclosure further provide acomputer-readable storage medium. The computer-readable storage mediumstores at least one computer program. The at least one computer programis loaded and executed by a processor to perform the operationsperformed in the route plotting method of the embodiments.

The term unit (and other similar terms such as subunit, module,submodule, etc.) in this disclosure may refer to a software unit, ahardware unit, or a combination thereof. A software unit (e.g., computerprogram) may be developed using a computer programming language. Ahardware unit may be implemented using processing circuitry and/ormemory. Each unit may be implemented using one or more processors (orprocessors and memory). Likewise, a processor (or processors and memory)may be used to implement one or more units. Moreover, each unit may bepart of an overall unit that includes the functionalities of the unit.

The embodiments of the present disclosure further provide a computerprogram product, including a computer program. The computer program isloaded and executed by a processor to implement the operations performedin the route plotting method of the embodiments. In some embodiments,the computer program involved in the embodiments of the presentdisclosure may be deployed on a computing device for being executed, orexecuted on multiple computing devices located in one location, orexecuted on multiple computing devices distributed in multiple locationsand interconnected via a communication network. The multiple computingdevices distributed in the multiple locations and interconnected via thecommunication network may constitute a blockchain system.

What is claimed is:
 1. A route plotting method, executed by a computingdevice, and the method comprising: determining multiple position pointsin an electronic map, the electronic map including a first longitudecoordinate range and a target longitude coordinate range, and longitudecoordinates of the multiple position points falling within the firstlongitude coordinate range; converting a project longitude coordinate tothe target longitude coordinate range in response to that the multipleposition points meet a conversion condition, the conversion conditionincluding: an absolute value of a difference between longitudecoordinates of adjacent position points is greater than a first value,the first value being a maximum value within the first longitudecoordinate range; and the project longitude coordinate is a longitudecoordinate in the longitude coordinates of the multiple position pointsthat does not fall within the target longitude coordinate range; andplotting, in order of converted longitude coordinates, a route formed byconnecting the multiple position points in the electronic map.
 2. Themethod according to claim 1, wherein the first longitude coordinaterange includes a first sub-range and a second sub-range, the targetlongitude coordinate range includes the second sub-range and a thirdsub-range, and converting the project longitude coordinate comprises:adding, in response to that a maximum value in the third sub-range isgreater than a maximum value in the first sub-range, a second value tothe project longitude coordinate; or, subtracting, in response to thatthe maximum value in the third sub-range is less than the maximum valuein the first sub-range, the second value from the project longitudecoordinate; wherein the second value is an absolute value of adifference between the maximum value in the third sub-range and themaximum value in the first sub-range.
 3. The method according to claim1, wherein converting the project longitude coordinate comprises:determining, based on a target map region currently displayed in theelectronic map, a second longitude coordinate range corresponding to thetarget map region, longitude coordinates within the second longitudecoordinate range increasing in sequence; for every two adjacent positionpoints of the multiple position points, converting the project longitudecoordinate in longitude coordinates of the two position points to thetarget longitude coordinate range in response to that the absolute valueof the difference between the longitude coordinates of the two positionpoints is greater than the first value; and converting the longitudecoordinates of the two position points to the target longitudecoordinate range in response to that the absolute value of thedifference between the longitude coordinates of the two position pointsis not greater than the first value, and in response to that thelongitude coordinates of the two position points do not fall within thetarget longitude coordinate range and do not fall within the secondlongitude coordinate range.
 4. The method according to claim 3, whereinthe first longitude coordinate range includes a first sub-range and asecond sub-range, the target longitude coordinate range includes thesecond sub-range and a third sub-range, and converting the longitudecoordinates comprises: adding a second value to the longitudecoordinates of the two position points in response to that a maximumvalue in the third sub-range is greater than a maximum value in thefirst sub-range, and in response to that the longitude coordinates ofthe two position points do not fall within the second sub-range and donot fall within the second longitude coordinate range; or, subtractingthe second value from the longitude coordinates of the two positionpoints in response to that the maximum value in the third sub-range isless than the maximum value in the first sub-range, and in response tothat the longitude coordinates of the two position points do not fallwithin the second sub-range and do not fall within the second longitudecoordinate range; wherein the second value is an absolute value of adifference between the maximum value in the third sub-range and themaximum value in the first sub-range.
 5. The method according to claim1, wherein the first longitude coordinate range includes positivenumbers and negative numbers, and the target longitude coordinate rangeexcludes positive numbers or excludes negative numbers.
 6. The methodaccording to claim 5, further comprising: determining, based on a targetmap region currently displayed in the electronic map, a longitudecoordinate of a center point of the target map region, the longitudecoordinate of the center point falling within the first longitudecoordinate range; determining a longitude coordinate range from 0° to360° as the target longitude coordinate range in response to that thelongitude coordinate of the center point is greater than 0°; anddetermining a longitude coordinate range from −360° to 0° as the targetlongitude coordinate range in response to that the longitude coordinateof the center point is not greater than 0°.
 7. The method according toclaim 1, further comprising: changing, for each of the multiple positionpoints, a latitude coordinate of the position point to a maximumlatitude coordinate in response to that the latitude coordinate of theposition point is greater than the maximum latitude coordinate of theelectronic map; and changing, for each of the multiple position points,the latitude coordinate of the position point to a minimum latitudecoordinate in response to that the latitude coordinate of the positionpoint is less than the minimum latitude coordinate of the electronicmap.
 8. The method according to claim 1, wherein plotting the routecomprises: plotting a route formed by connecting the multiple positionpoints in the electronic map in order of the converted longitudecoordinates from large to small or in order of the converted longitudecoordinates from small to large.
 9. The method according to claim 1,wherein the multiple position points include a starting point, an endpoint and way points between the starting point and the end point, andthe method further comprises: acquiring, in response to a route plottingrequest based on the electronic map, the starting point and the endpoint corresponding to the route plotting request; and determiningcoordinates of the way points between the starting point and the endpoint according to the coordinates of the starting point and thecoordinates of the end point, the coordinates including a longitudecoordinate and a latitude coordinate.
 10. The method according to claim9, wherein determining the coordinates of the way points comprises:determining coordinates of at least one first way point between thestarting point and the end point according to the coordinates of thestarting point and the coordinates of the end point; and determining,from the starting point, the end point and the at least one first waypoint, coordinates of at least one second way point between every twoadjacent position points in parallel according to coordinates of everytwo adjacent position points.
 11. The method according to claim 10,wherein the quantity of the first way points is a target quantity, themethod further comprises: determining, based on the target map regioncurrently displayed in the electronic map, a maximum longitudecoordinate difference and a maximum latitude coordinate difference ofthe target map region; determining a target longitude coordinatedifference between the starting point and the end point, and a targetlatitude coordinate difference between the starting point and the endpoint; and determining, based on the maximum longitude coordinatedifference, the maximum latitude coordinate difference, the targetlongitude coordinate difference and the target latitude coordinatedifference, the target quantity.
 12. A route plotting apparatus, theapparatus comprising: a memory storing computer program instructions;and a processor coupled to the memory and configured to execute thecomputer program instructions and perform: determining multiple positionpoints in an electronic map, the electronic map including a firstlongitude coordinate range and a target longitude coordinate range, andlongitude coordinates of the multiple position points falling within thefirst longitude coordinate range; converting a project longitudecoordinate to the target longitude coordinate range in response to thatthe multiple position points meet a conversion condition, the conversioncondition including: an absolute value of a difference between longitudecoordinates of adjacent position points is greater than a first value,the first value being a maximum value within the first longitudecoordinate range; and the project longitude coordinate is a longitudecoordinate in the longitude coordinates of the multiple position pointsthat does not fall within the target longitude coordinate range; andplotting, in order of converted longitude coordinates, a route formed byconnecting the multiple position points in the electronic map.
 13. Theapparatus according to claim 12, wherein the first longitude coordinaterange includes a first sub-range and a second sub-range, the targetlongitude coordinate range includes the second sub-range and a thirdsub-range, and converting the project longitude coordinate includes:adding, in response to that a maximum value in the third sub-range isgreater than a maximum value in the first sub-range, a second value tothe project longitude coordinate; or, subtracting, in response to thatthe maximum value in the third sub-range is less than the maximum valuein the first sub-range, the second value from the project longitudecoordinate; wherein the second value is an absolute value of adifference between the maximum value in the third sub-range and themaximum value in the first sub-range.
 14. The apparatus according toclaim 12, wherein converting the project longitude coordinate includes:determining, based on a target map region currently displayed in theelectronic map, a second longitude coordinate range corresponding to thetarget map region, longitude coordinates within the second longitudecoordinate range increasing in sequence; for every two adjacent positionpoints of the multiple position points, converting the project longitudecoordinate in longitude coordinates of the two position points to thetarget longitude coordinate range in response to that the absolute valueof the difference between the longitude coordinates of the two positionpoints is greater than the first value; and converting the longitudecoordinates of the two position points to the target longitudecoordinate range in response to that the absolute value of thedifference between the longitude coordinates of the two position pointsis not greater than the first value, and in response to that thelongitude coordinates of the two position points do not fall within thetarget longitude coordinate range and do not fall within the secondlongitude coordinate range.
 15. The apparatus according to claim 12,wherein the first longitude coordinate range includes a first sub-rangeand a second sub-range, the target longitude coordinate range includesthe second sub-range and a third sub-range, and converting the longitudecoordinates includes: adding a second value to the longitude coordinatesof the two position points in response to that a maximum value in thethird sub-range is greater than a maximum value in the first sub-range,and in response to that the longitude coordinates of the two positionpoints do not fall within the second sub-range and do not fall withinthe second longitude coordinate range; or, subtracting the second valuefrom the longitude coordinates of the two position points in response tothat the maximum value in the third sub-range is less than the maximumvalue in the first sub-range, and in response to that the longitudecoordinates of the two position points do not fall within the secondsub-range and do not fall within the second longitude coordinate range;wherein the second value is an absolute value of a difference betweenthe maximum value in the third sub-range and the maximum value in thefirst sub-range.
 16. The apparatus according to claim 12, wherein thefirst longitude coordinate range includes positive numbers and negativenumbers, and the target longitude coordinate range excludes positivenumbers or excludes negative numbers.
 17. The apparatus according toclaim 12, wherein the processor is further configured to execute thecomputer program instructions and perform: changing, for each of themultiple position points, a latitude coordinate of the position point toa maximum latitude coordinate in response to that the latitudecoordinate of the position point is greater than the maximum latitudecoordinate of the electronic map; and changing, for each of the multipleposition points, the latitude coordinate of the position point to aminimum latitude coordinate in response to that the latitude coordinateof the position point is less than the minimum latitude coordinate ofthe electronic map.
 18. The apparatus according to claim 12, whereinplotting the route includes: plotting a route formed by connecting themultiple position points in the electronic map in order of the convertedlongitude coordinates from large to small or in order of the convertedlongitude coordinates from small to large.
 19. The apparatus accordingto claim 12, wherein the multiple position points include a startingpoint, an end point and way points between the starting point and theend point, and the processor is further configured to execute thecomputer program instructions and perform: acquiring, in response to aroute plotting request based on the electronic map, the starting pointand the end point corresponding to the route plotting request; anddetermining coordinates of the way points between the starting point andthe end point according to the coordinates of the starting point and thecoordinates of the end point, the coordinates including a longitudecoordinate and a latitude coordinate.
 20. A non-transitorycomputer-readable storage medium storing computer program instructionsexecutable by at least one processor to perform: determining multipleposition points in an electronic map, the electronic map including afirst longitude coordinate range and a target longitude coordinaterange, and longitude coordinates of the multiple position points fallingwithin the first longitude coordinate range; converting a projectlongitude coordinate to the target longitude coordinate range inresponse to that the multiple position points meet a conversioncondition, the conversion condition including: an absolute value of adifference between longitude coordinates of adjacent position points isgreater than a first value, the first value being a maximum value withinthe first longitude coordinate range; and the project longitudecoordinate is a longitude coordinate in the longitude coordinates of themultiple position points that does not fall within the target longitudecoordinate range; and plotting, in order of converted longitudecoordinates, a route formed by connecting the multiple position pointsin the electronic map.